package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * OrderGoods entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_ORDER_GOODS", schema = "HCD_DEV")
public class OrderGoods extends Entity implements java.io.Serializable {

	// Fields

	private Long orderGoodsId;
	private Order order;
	private Long storeGoodsId;
	private String barCode;
	private Integer type;
	private Boolean checked;
	private String name;
	private String unit;
	private Float selfCost;
	private Float price;
	private String buyUnit;
	private Double unitConvert;
	private Float buyCount;
	private Double reckonCount;
	private Float reckonCost;
	private Float realCount;
	private Float realCost;
	private String pic;
	private Long goodsTime;
	private Long orderTime;

	// Constructors

	/** default constructor */
	public OrderGoods() {
	}

	/** minimal constructor */
	public OrderGoods(Order order, Long storeGoodsId, String barCode, Integer type,
			Boolean checked, String name, String unit, Float selfCost, Float price, Float buyCount,
			Float reckonCost, Float realCount, Float realCost, Long goodsTime, Long orderTime) {
		this.order = order;
		this.storeGoodsId = storeGoodsId;
		this.barCode = barCode;
		this.type = type;
		this.checked = checked;
		this.name = name;
		this.unit = unit;
		this.selfCost = selfCost;
		this.price = price;
		this.buyCount = buyCount;
		this.reckonCost = reckonCost;
		this.realCount = realCount;
		this.realCost = realCost;
		this.goodsTime = goodsTime;
		this.orderTime = orderTime;
	}

	/** full constructor */
	public OrderGoods(Order order, Long storeGoodsId, String barCode, Integer type,
			Boolean checked, String name, String unit, Float selfCost, Float price, String buyUnit,
			Double unitConvert, Float buyCount, Double reckonCount, Float reckonCost,
			Float realCount, Float realCost, String pic, Long goodsTime, Long orderTime) {
		this.order = order;
		this.storeGoodsId = storeGoodsId;
		this.barCode = barCode;
		this.type = type;
		this.checked = checked;
		this.name = name;
		this.unit = unit;
		this.selfCost = selfCost;
		this.price = price;
		this.buyUnit = buyUnit;
		this.unitConvert = unitConvert;
		this.buyCount = buyCount;
		this.reckonCount = reckonCount;
		this.reckonCost = reckonCost;
		this.realCount = realCount;
		this.realCost = realCost;
		this.pic = pic;
		this.goodsTime = goodsTime;
		this.orderTime = orderTime;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_ORDER_GOODS")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "ORDER_GOODS_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getOrderGoodsId() {
		return this.orderGoodsId;
	}

	public void setOrderGoodsId(Long orderGoodsId) {
		this.orderGoodsId = orderGoodsId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORDER_ID", nullable = false)
	public Order getOrder() {
		return this.order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	@Column(name = "STORE_GOODS_ID", nullable = false, precision = 15, scale = 0)
	public Long getStoreGoodsId() {
		return this.storeGoodsId;
	}

	public void setStoreGoodsId(Long storeGoodsId) {
		this.storeGoodsId = storeGoodsId;
	}

	@Column(name = "BAR_CODE", nullable = false, length = 20)
	public String getBarCode() {
		return this.barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}

	@Column(name = "TYPE", nullable = false, precision = 2, scale = 0)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "CHECKED", nullable = false, precision = 1, scale = 0)
	public Boolean getChecked() {
		return this.checked;
	}

	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	@Column(name = "NAME", nullable = false, length = 250)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "UNIT", nullable = false, length = 30)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	@Column(name = "SELF_COST", nullable = false, precision = 8)
	public Float getSelfCost() {
		return this.selfCost;
	}

	public void setSelfCost(Float selfCost) {
		this.selfCost = selfCost;
	}

	@Column(name = "PRICE", nullable = false, precision = 8)
	public Float getPrice() {
		return this.price;
	}

	public void setPrice(Float price) {
		this.price = price;
	}

	@Column(name = "BUY_UNIT", length = 30)
	public String getBuyUnit() {
		return this.buyUnit;
	}

	public void setBuyUnit(String buyUnit) {
		this.buyUnit = buyUnit;
	}

	@Column(name = "UNIT_CONVERT", precision = 8, scale = 1)
	public Double getUnitConvert() {
		return this.unitConvert;
	}

	public void setUnitConvert(Double unitConvert) {
		this.unitConvert = unitConvert;
	}

	@Column(name = "BUY_COUNT", nullable = false, precision = 8, scale = 1)
	public Float getBuyCount() {
		return this.buyCount;
	}

	public void setBuyCount(Float buyCount) {
		this.buyCount = buyCount;
	}

	@Column(name = "RECKON_COUNT", precision = 8, scale = 1)
	public Double getReckonCount() {
		return this.reckonCount;
	}

	public void setReckonCount(Double reckonCount) {
		this.reckonCount = reckonCount;
	}

	@Column(name = "RECKON_COST", nullable = false, precision = 8)
	public Float getReckonCost() {
		return this.reckonCost;
	}

	public void setReckonCost(Float reckonCost) {
		this.reckonCost = reckonCost;
	}

	@Column(name = "REAL_COUNT", nullable = false, precision = 8)
	public Float getRealCount() {
		return this.realCount;
	}

	public void setRealCount(Float realCount) {
		this.realCount = realCount;
	}

	@Column(name = "REAL_COST", nullable = false, precision = 8)
	public Float getRealCost() {
		return this.realCost;
	}

	public void setRealCost(Float realCost) {
		this.realCost = realCost;
	}

	@Column(name = "PIC", length = 100)
	public String getPic() {
		return this.pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	@Column(name = "GOODS_TIME", nullable = false, precision = 15, scale = 0)
	public Long getGoodsTime() {
		return this.goodsTime;
	}

	public void setGoodsTime(Long goodsTime) {
		this.goodsTime = goodsTime;
	}

	@Column(name = "ORDER_TIME", nullable = false, precision = 15, scale = 0)
	public Long getOrderTime() {
		return this.orderTime;
	}

	public void setOrderTime(Long orderTime) {
		this.orderTime = orderTime;
	}

}